package base.interactive.http;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

/**
 * Response wrapper
 *
 * @description: http请求包装类未扩展
 * @author: cyj
 * @date 2020 -10-27 14:44:48
 */
public class ResponseWrapper<T> {

    /**
     * Response entity
     */
    private ResponseEntity<T> responseEntity;

    /**
     * Response wrapper
     *
     * @param responseEntity response entity
     */
    public ResponseWrapper (ResponseEntity<T> responseEntity) {
        this.responseEntity = responseEntity;
    }

    /**
     * Gets body * @description:
     *
     * @return the body
     */
    public T getBody () {
        return this.responseEntity.getBody();
    }

    /**
     * Gets http status * @description:
     *
     * @return the http status
     */
    public HttpStatus getHttpStatus () {
        return this.getHttpStatus();
    }

    /**
     * Gets http status code * @description:
     *
     * @return the http status code
     */
    public int getHttpStatusCode () {
        return this.getHttpStatusCode();
    }

    /**
     * Gets headers * @description:
     *
     * @return the headers
     */
    public int getHeaders () {
        return this.getHeaders();
    }
}
